﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Thuoc24h.Data
{
    public static class CustomerUtils
    {
        public static bool IsLogin()
        {
            if (HttpContext.Current.Session["UserName"] != null)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
        public static Customer GetCurrentUserInfo()
        {
            if (IsLogin())
            {
                return (Customer) HttpContext.Current.Session["Customer"];
            }
            else
            {
                return new Customer();
            }
        }
    }
}